﻿<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/naija.Master" CodeBehind="Discussions.aspx.vb" Inherits="WebApplication11.WebForm1" 
    title="NaijaTradStyles- Comments" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div>
    <div id="LeftHorizantalDetails">
    <div class="UserImage"></div>
    <div class="LeftAdvert"></div>
    </div>
    <div id="CommentContents">
        <asp:FormView ID="FormView1" runat="server" DataSourceID="SqlDataSource1" 
            EnableModelValidation="True">
            <ItemTemplate>
                &nbsp;<div><asp:Image ID="Image1" runat="server" Height="574px" 
                    ImageUrl='<%# Eval("ProfileImage") %>' Width="448px" />
                    </div><div class="CommentTitle">
                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("PicTitle") %>'></asp:Label></div>
            </ItemTemplate>
        </asp:FormView>
        <br />
        <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource2">
        <ItemTemplate>
        <div>
        <div>
            <asp:Label ID="Label2" runat="server" Text='<%#Eval ("Body") %>'></asp:Label></div>
       <div>Date: <asp:Label ID="Date" runat="server" Text='<%#Eval("PostingDate") %>'></asp:Label></div> 
        </div>
        </ItemTemplate>
        <SeparatorTemplate><hr /></SeparatorTemplate>
        </asp:Repeater>
        
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\pictures1.accdb;Persist Security Info=True" 
            ProviderName="System.Data.OleDb" 
            SelectCommand="SELECT [Title], [Body], [PostingDate] FROM [POSTING] WHERE ([Paper] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="Paper" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
        <br />
        <h1>
            Add Comment</h1>
        <p >
            Your Name</p>
        <p >
            <asp:TextBox ID="YourName" runat="server"  
                            Width="269px"></asp:TextBox>
        </p>
        <p >
            Comment</p>
        <p>
            <asp:TextBox ID="Comment" runat="server" Height="152px" 
                           TextMode="MultiLine" Width="357px"></asp:TextBox>
        </p>
        <asp:Button ID="Button2" runat="server" Text="Post" />
        
        <br />
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
            
            
            SelectCommand="SELECT ProfileImage, PicTitle, Description, TodayDate, UserName, ID FROM UsersUpload WHERE (ID = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
        </div>
    <div id="RightHorizanalDetails">
    <div class="UserImage"></div>
    <div class="LeftAdvert"></div>
    </div>
    </div>
</asp:Content>
